    package com.thomas.sharing.mybatis.entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.ibatis.type.Alias;

@Entity
@Table
@Alias("Price")
public class Price implements Serializable{

	@Transient
	private static final long serialVersionUID = 5036895933699105837L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "fourSId")
	private FourS fourS;
	
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "carId")
	private Car car;
	
	@Column
	private Integer price;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}	

	public FourS getFourS() {
		return fourS;
	}

	public void setFourS(FourS fourS) {
		this.fourS = fourS;
	}

	public Car getCar() {
		return car;
	}

	public void setCar(Car car) {
		this.car = car;
	}

	public Integer getPrice() {
		return price;
	}

	public void setPrice(Integer price) {
		this.price = price;
	}
	
	
	
}
